#pragma once

#include "SP.h"

namespace SPG
{
	using namespace SP;

	class GStatic;
	class GWorld;
	class GDeathMatch;
	class GPawn;
	class GPlayerController;
	class GPlayerCamera;

	//-------------------------------------------------------------
	class GStatic
	{
	public:
		friend GStatic* GGetStatic();
		void LoadResource();
		void ReleaseResource();

		SPParticleSystem* m_pPSPlayerPawn;
		SPParticleSystem*	m_pPSWorld;
	private:
	};



	//-------------------------------------------------------------
	class GWorld : public SPWorld
	{
	public:
		GWorld();
	};



	//-------------------------------------------------------------
	class GDeathMatch : public SPGame
	{
	public:
		GDeathMatch();
		~GDeathMatch();

		virtual void StartMatch();
		virtual void EndMatch();
		virtual SPPlayerController* SpawnPlayer();
	};



	//-------------------------------------------------------------
	class GPlayerPawn : public SPPawn
	{
	public:
		GPlayerPawn( GPlayerController* );

		void Fire();

		virtual void OnAdvance( float fElapsedTime );
		GPlayerController* m_pGPlayerController;
	};



	//-------------------------------------------------------------
	class GPlayerController : public SPPlayerController
	{
	public:
		GPlayerController();

		virtual SPPawn* SpawnPawn();
		virtual SPPlayerCamera* SpawnPlayerCamera();
		void OnAdvance( float fElapsedTime );
		
		GPlayerPawn* m_pGPlayerPawn;
	};



	//-------------------------------------------------------------
	class GPlayerCamera : public SPPlayerCamera
	{
	public:
		GPlayerCamera( GPlayerController* pOwnerController );
		virtual void OnAdvance( float fElapsedTime );

		GPlayerController* m_pGPlayerController;
	};
}

